﻿using UnityEngine;
using System.Collections;

public class ObjectiveExitLevel : MonoBehaviour, ILevelObjective {

	Level theLevel;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public bool ObjectiveAchieved()
	{
		GameObject theHero = theLevel.Hero;
		ExitPoint exitComponent = theLevel.ExitPoint.GetComponent<ExitPoint>();


		return exitComponent.PlayerEnteredExitPoint;
	}

	public void SetLevel(Level level)
	{
		theLevel = level;
	}
}
